import io.reactivex.Flowable;
import org.junit.Test;

import java.io.IOException;

/**
 * testRx
 *
 * @author liyixin
 * @date 2019/1/23
 */
public class testRx {

    @Test
    public void test() throws IOException {
        Flowable.just(1,2,3)
                .reduce((x,y) -> {
                    int a = x + y;
                    System.out.println(a);
                    return a;
                }).subscribe(System.out::println);

        System.in.read();
    }
}
